 function do_js_beautify(clickId, contentHtml) {
        document.getElementById(clickId).disabled = true;
        js_source = contentHtml.replace(/^\s+/, '');
        tabsize = 4;
        tabchar = ' ';
        if (tabsize == 1) {
            tabchar = '\t';
        }
        if (js_source && js_source.charAt(0) === '<') {
		    var html = style_html(js_source, tabsize, tabchar, 80);
			document.getElementById(clickId).disabled = false;
            return html;
        } else {
			document.getElementById(clickId).disabled = false;
			var html = js_beautify(js_source, tabsize, tabchar);
            return html;
        }
    }